﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Advertising.Mobile.UI;

namespace QuickTasks.Views.Help
{
    public partial class HelpMenu : PhoneApplicationPage
    {
        public HelpMenu()
        {
            InitializeComponent();
          
        }
     
        private void lbxHelpMenu_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                if (lbxHelpMenu.SelectedIndex != -1)
                {
                    int help = lbxHelpMenu.SelectedIndex;
                    lbxHelpMenu.SelectedIndex = -1;
                    if (help == 0)
                        NavigationService.Navigate(new Uri("/Views/Help/HowToAddPeople.xaml", UriKind.Relative));
                    if (help == 1)
                        NavigationService.Navigate(new Uri("/Views/Help/HowToAddMessages.xaml", UriKind.Relative));
                    if (help == 2)
                        NavigationService.Navigate(new Uri("/Views/Help/HowToAddLinks.xaml", UriKind.Relative));
                    if (help == 3)
                        NavigationService.Navigate(new Uri("/Views/Help/HowToAddTasks.xaml", UriKind.Relative));
                    if (help == 4)
                        NavigationService.Navigate(new Uri("/Views/Help/HowToAddLocations.xaml", UriKind.Relative));
                    if (help == 5)
                        NavigationService.Navigate(new Uri("/Views/Help/HowToSetBackground.xaml", UriKind.Relative));
                    if (help == 6)
                        NavigationService.Navigate(new Uri("/Views/Help/HowToSendEmailAndSms.xaml", UriKind.Relative));
                    if (help == 7)
                        NavigationService.Navigate(new Uri("/Views/Help/HowToSetCurrentLocation.xaml", UriKind.Relative));

                }
            }
            catch (Exception ex)
            {

                Exceptions.SaveOrSendExceptions("Exception in lbxHelpMenu_SelectionChanged method In HelpMenu.xaml page", ex);
            
            }
        }
    }
}